Skip to content

Add Icons Per Row setting for all bars#98

Open
tylergraydev wants to merge 1 commit intoDaleHuntGB:mainfrom
tylergraydev:icons-per-row
Open

Add Icons Per Row setting for all bars#98
tylergraydev wants to merge 1 commit intoDaleHuntGB:mainfrom
tylergraydev:icons-per-row

Conversation

@tylergraydev
Copy link
Copy Markdown

@tylergraydev tylergraydev commented Feb 28, 2026

Summary

  • Adds an Icons Per Row slider (range 1–40, default 40) to every bar type: Essential, Utility, Buffs, Custom, Additional Custom, Item, Trinket, and Items/Spells.
  • When set below 40, icons wrap into a grid layout with multiple rows/columns (depending on growth direction).
  • Default of 40 preserves existing single-row behavior — users slide left to reduce icons per row.
  • Extracts duplicated layout logic from 5 custom bar modules into a shared BCDM:LayoutIconGrid() utility function, reducing ~380 lines of repeated code to ~80 lines of shared logic.
  • Blizzard bars (Essential, Utility, Buffs) override iconLimit via CenterWrappedRows when the setting is active.

Changes

File What changed
Core/Defaults.lua Added IconsPerRow = 40 to all bar defaults
Core/Globals.lua Added shared LayoutIconGrid() function
Core/GUI.lua Added Icons Per Row slider for all viewer types
Locales/enUS.lua Added locale string
Modules/CooldownManager.lua Override iconLimit in CenterWrappedRows, trigger on IconsPerRow < 40
Modules/CustomCooldownViewer.lua Replaced inline layout with LayoutIconGrid call
Modules/AdditionalCustomCooldownViewer.lua Same
Modules/CustomItemViewer.lua Same
Modules/CustomItemSpellViewer.lua Same
Modules/TrinketBar.lua Same

Test plan

  • Set "Icons Per Row" to 3 on any custom bar with 6+ spells — should display 2 rows of 3
  • Test each growth direction (Right, Left, Up, Down) with multi-row layout
  • Set to 40 (default) — should behave identically to before this change (single row)
  • Set "Icons Per Row" on Essential/Utility bars — icons should wrap at that limit
  • Set "Icons Per Row" on Buffs bar — buff icons should wrap at that limit
  • Verify centered layout (TOP/BOTTOM anchor + horizontal growth) centers each row independently
  • Test with 1 icon per row (vertical stack)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant